//
//  YJDUserTipView.m
//  YJDSDK
//
//  Created by skyline on 2018/3/7.
//  Copyright © 2018年 skyline. All rights reserved.
//

#import "YJDUserTipView.h"

@interface YJDUserTipView()
@property (nonatomic, strong) YJDLabel *label;
@end
@implementation YJDUserTipView
- (instancetype)initWithText:(NSString *)text
{
    self = [super init];
    if (self)
    {
        self.backgroundColor = [YJDHelper shareHelp].color;
        self.label.text = text;
    }
    return self;
}

- (YJDLabel *)label
{
    if (!_label)
    {
        _label = [[YJDLabel alloc] init];
        _label.textColor = [UIColor whiteColor];
        _label.font = [UIFont systemFontOfSize:15];
        [self addSubview:_label];
        [_label mas_makeConstraints:^(SK_MASConstraintMaker *make) {
            make.left.equalTo(self).with.offset(5);
            make.centerY.equalTo(self);
        }];
    }
    return _label;
}

/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
